package com.evildog.workspace.system.application.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.evildog.workspace.common.object.PageQuery;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.dependencies.mybatis.object.BaseStatusDTO;
import com.evildog.workspace.dependencies.mybatis.object.QueryConditionDTO;
import com.evildog.workspace.system.application.bo.*;
import com.evildog.workspace.system.application.dto.ApiPermissionDTO;
import com.evildog.workspace.system.application.dto.ApiPermissionPageDTO;
import com.evildog.workspace.system.application.entity.ApiPermission;

import java.util.List;

/**
 * <p>
 * apiPermission Service
 * </p>
 *
 * @author evildog
 * @since 2020-07-25
 */
public interface ApiPermissionService extends IService<ApiPermission> {

    /**
    * 自定义分页
    */
    PagedResult<ApiPermissionPageBO> getPageList(PageQuery query, List<QueryConditionDTO> queryConditions, ApiPermissionPageDTO pageDTO);


    /**
    * 获取详情
    */
    ApiPermissionBO getDetailById(Long id);

    /**
    * 获取详情
    */
    boolean updateById(Long id, ApiPermissionDTO param);

    /**
    * 获取详情
    */
    boolean save(ApiPermissionDTO param);

    List<ApiPermissionClientBO> getAllPermissions();

    List<ApiPermissionClientBO> getUserPermissions(Long userId);

    boolean remove(Long id);

    List<ApiPermissionAllocBO> getAllocList();

    List<ApiPermissionListBO> getListByMenu(Long menuPermissionId);

    List<ApiPermissionListBO> getListByComponentId(Long componentPermissionId);


    boolean updateStatus(Long id, BaseStatusDTO baseStatusDTO);
}
